<template>
  <div>
    <div class="top-title">轴承温度监测</div>
    <div class="center">
      <div class="center-item">
        <div class="title">前轴温度</div>
        <div>
          <span class="value before-value">37.7</span>
          <span class="cam">℃</span>
        </div>
      </div>
      <div class="center-item">
        <div class="title">后轴温度</div>
        <div>
          <span class="value after-value">29.6</span>
          <span class="cam">℃</span>
        </div>
      </div>
    </div>
    <MouldBox
      :chartOption="chartOption"
      :datas="lists"
      :text="text"
      chartTitle="近24小时风机轴承温度分析"
      height="10.0625rem"
    ></MouldBox>
  </div>
</template>

<script>
import MouldBox from '../common/MouldBox.vue';
export default {
  data() {
    return {
      chartOption: {
        color: ['#00F3F6', '#DFB906'],
        area: false,
        unit: '℃'
      },
      lists: [
        { x: '12-01', y: 38.2, s: '前轴温度' },
        { x: '12-06', y: 30.2, s: '前轴温度' },
        { x: '12-11', y: 36.0, s: '前轴温度' },
        { x: '12-16', y: 37.3, s: '前轴温度' },
        { x: '12-21', y: 37.9, s: '前轴温度' },
        { x: '12-26', y: 34.2, s: '前轴温度' },
        { x: '12-31', y: 36.7, s: '前轴温度' },
        { x: '12-01', y: 27.5, s: '后轴温度' },
        { x: '12-06', y: 23.0, s: '后轴温度' },
        { x: '12-11', y: 26.0, s: '后轴温度' },
        { x: '12-16', y: 33.7, s: '后轴温度' },
        { x: '12-21', y: 37.9, s: '后轴温度' },
        { x: '12-26', y: 24.2, s: '后轴温度' },
        { x: '12-31', y: 35.1, s: '后轴温度' }
      ],
      curTab: 0,
      text: ['前轴温度', '后轴温度']
    };
  },

  components: {
    MouldBox
  },

  computed: {
  },

  methods: {
  }
};
</script>
<style scoped lang="scss">
.top-title{
  font-size: 1rem;
  color: #F8F8F8;
  margin: .3125rem 0 .9375rem;
}
.center {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  .center-item {
    width: 10rem;
    height: 3.4375rem;
    border-radius: 0.25rem;
    background-color: #273443;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem;
    box-sizing: border-box;
    margin-bottom: .9375rem;
    .title {
      color: #d8d8d8;
      font-size: 0.875rem;
    }
    .value {
      font-size: 0.875rem;
      color: #ffffff;
      margin-right: 0.3125rem;
    }
    .cam {
      font-size: 0.75rem;
      color: #8d8d8d;
    }
    .before-value{
      color: #00FDFF;
    }
    .after-value{
      color: #FFD101;
    }
  }
}
</style>
